package com.wushi.lenovo.asia5b.app_di.profile.presenter;

import com.wushi.lenovo.asia5b.app_di.other.presenter.CodePresenter;
import com.wushi.lenovo.asia5b.app_di.profile.mvpview.ChangeLoginPassActivityMvpView;
import com.wushi.lenovo.asia5b.app_http.ApiService;

import java.util.Map;

import javax.inject.Inject;

/**
 * Created by zhangyuncai on 2018/12/6.
 */
public class ChangeLoginPassActivityPresenter extends CodePresenter<ChangeLoginPassActivityMvpView> {


    @Inject
    public ChangeLoginPassActivityPresenter(ApiService apiService) {
        super(apiService);
    }

    public void changePass(Map<String, Object> map) {
        baseSubscribe(apiService.changeLoginPassWord(map), resultModel -> {
            getView().changePassResult(resultModel);
        });
    }

    public void sendCode() {
        super.sendCode(CodeType.CHANGE_LOGINPASS);
    }
}